ci: replace Vercel previews with UiPath Coded App previews#895
ci: replace Vercel previews with UiPath Coded App previews#895fikewa-olatunji wants to merge 34 commits into
Conversation
Deploy Apollo preview apps through UiPath Coded Apps and remove the Vercel PR workflow.
Moves the Coded App preview recipes from uip-go built-ins into .uip-go.json and replaces the uip-go build overlays with env-gated app sources, so deploy changes no longer require a uip-go release. Uses uip-go 0.2.0. - .uip-go.json: apollo-docs/landing/design/vertex recipes; vertex declares aiChat redirectPath + scope; Next.js apps use pagefind: true - next configs: APOLLO_CODED_APP=1 switches to output: "export" with basePath from APOLLO_CODED_APP_PATH; vertex maps UIP_GO_AICHAT_* into NEXT_PUBLIC_* - root/components pages render the overview inline in coded app builds (static exports cannot redirect); mdx.d.ts committed for the mdx imports - AI Chat reads NEXT_PUBLIC_APOLLO_VERTEX_AICHAT_* with the previous alpha values as dev fallbacks: direct platform calls, pinned org/tenant, identity logout origin, canonical redirect path, disabled panel without a client id - vertex logo src prefixed with the coded app path (basePath misses raw img) - pagefind added to apollo-docs (previously borrowed from vertex via uip-go) - turbo build hashes APOLLO_CODED_APP/APOLLO_CODED_APP_PATH so coded and normal builds do not share cache entries
|
Apollo Coded App preview deployments are ready.
|
Dependency License Review
License distribution
Excluded packages
|
There was a problem hiding this comment.
Pull request overview
This PR replaces the existing Vercel-based PR preview deployments with UiPath Coded App preview deployments driven by @uipath/uip-go, and updates the affected Next.js apps (Docs + Vertex) to support static exports under a per-preview sub-path and direct platform calls where needed (notably for Vertex AI Chat).
Changes:
- Adds a new GitHub Actions workflow to deploy and clean up per-PR Coded App previews, and removes the old Vercel deployment workflow.
- Introduces Coded App build gating for Next.js apps (static export + basePath handling) and updates Vertex AI Chat to support direct platform endpoints.
- Adds uip-go deployment recipes (
.uip-go.json), build cache env hashing, and supporting deps/ignores for local packaging artifacts.
Reviewed changes
Copilot reviewed 14 out of 18 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
turbo.json |
Adds env-hashing for coded-app vs regular builds to avoid cache collisions. |
pnpm-lock.yaml |
Locks pagefind for apps that need it and includes a lockfile metadata tweak. |
apps/apollo-vertex/templates/AiChatTemplate.tsx |
Wires coded-app AI Chat parameters and adds a coded-app disabled state. |
apps/apollo-vertex/templates/ai-chat/AiChatLoginGate.tsx |
Adds coded-app org/tenant handling and adjusts logout URL construction for coded-app flows. |
apps/apollo-vertex/templates/ai-chat/AiChatAgentHubMode.tsx |
Switches platform API base URLs to direct calls when running as a coded app export. |
apps/apollo-vertex/templates/ai-chat/ai-chat-example-utils.ts |
Adds coded-app env plumbing for AI Chat (direct base URL, redirect path, static org/tenant). |
apps/apollo-vertex/next.config.ts |
Adds a coded-app export mode (output/export + basePath) and injects NEXT_PUBLIC_* vars for AI Chat. |
apps/apollo-vertex/mdx.d.ts |
Adds TS module typing for .mdx imports. |
apps/apollo-vertex/app/layout.tsx |
Prefixes logo asset path for coded-app basePath hosting. |
apps/apollo-vertex/app/components/page.tsx |
Replaces redirect with inline overview rendering for static exports. |
apps/apollo-docs/package.json |
Adds pagefind devDependency for docs search indexing. |
apps/apollo-docs/next.config.mjs |
Enables coded-app static export + basePath when gated by env. |
apps/apollo-docs/mdx.d.ts |
Adds TS module typing for .mdx imports. |
apps/apollo-docs/app/page.tsx |
Replaces redirect with inline overview rendering for static exports. |
.uip-go.json |
Defines coded-app deployment recipes for docs/landing/design/vertex, including pagefind and AI Chat settings. |
.gitignore |
Ignores local UiPath coded-app packaging/build artifacts. |
.github/workflows/vercel-deploy.yml |
Removes the old Vercel preview deployment workflow. |
.github/workflows/preview-deploy.yml |
Adds the new uip-go powered coded-app preview deploy + PR comment + cleanup workflow. |
Files not reviewed (1)
- pnpm-lock.yaml: Generated file
| with: | ||
| fetch-depth: 1 | ||
| persist-credentials: false | ||
| ref: ${{ github.event.pull_request.base.sha }} |
| export const AICHAT_REDIRECT_PATH = | ||
| process.env.NEXT_PUBLIC_APOLLO_VERTEX_AICHAT_REDIRECT_PATH || | ||
| "/auth_callback"; |
| const UIPATH_BASE_URL = AICHAT_DIRECT_BASE_URL || "https://alpha.uipath.com"; | ||
|
|
||
| export function createUiPathSdk( | ||
| accessToken: string, |
| permissions: | ||
| issues: write | ||
| pull-requests: write |
| permissions: | ||
| issues: write | ||
| pull-requests: write |
The close-event cleanup checked out the base sha, which does not have .uip-go.json, so uip-go 0.2.0 found no vertex recipe and the redirect removal failed. The recipes live on the PR branch; the deploy job already runs head code with the same secrets and the job is fork-gated. Also uses uip-go 0.2.1, which no longer scaffolds .uip-go.json during cleanup-only runs.
📊 Coverage + size by packagePer-package bundle size on this PR (no JS/TS source changes detected under
"Coverage" is each package's own |
| permissions: | ||
| issues: write | ||
| pull-requests: write | ||
|
|
| permissions: | ||
| issues: write | ||
| pull-requests: write | ||
|
|
| <p className="mt-2 max-w-xl text-sm text-muted-foreground"> | ||
| The demo needs browser calls to UiPath backend services that are | ||
| blocked by cross-origin preflight checks in the Coded App host. The | ||
| rest of Apollo Vertex is still available in this preview. | ||
| </p> |
Summary
Deploys per-PR previews of apollo-docs, apollo-landing, apollo-design, and apollo-vertex as UiPath Coded Apps via
@uipath/uip-go, replacing Vercel previews.All deployment knowledge is owned by this repo, so deploy changes never require a uip-go release:
.uip-go.jsondefines the four deployment recipes (build commands, staged Next.js static exports, pagefind indexing, post-processing, AI Chat platform context).APOLLO_CODED_APP=1switches the docs/vertex next configs tooutput: "export"with a basePath fromAPOLLO_CODED_APP_PATH, and the root/components index pages render the overview inline (static exports cannot redirect).NEXT_PUBLIC_APOLLO_VERTEX_AICHAT_*(mapped innext.config.tsfrom theUIP_GO_AICHAT_*values uip-go resolves at deploy time) to call the platform directly — direct AgentHub/Data Fabric URLs, pinned org/tenant, identity logout origin, and the canonical OAuth redirect path. Dev keeps the same-origin proxy behavior via the existing fallbacks. Without a client id the chat renders a clear disabled state.APOLLO_CODED_APP/APOLLO_CODED_APP_PATHso coded-app and regular builds never share cache entries;pagefindis a proper devDependency of each app that needs it.Verification
Supersedes #874 and #883.